home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form frmCombo
- BackColor = &H00C0C0C0&
- BorderStyle = 3 'Fixed Double
- Caption = "ComboBox Demo"
- ClientHeight = 3855
- ClientLeft = 885
- ClientTop = 1455
- ClientWidth = 5580
- ClipControls = 0 'False
- Height = 4260
- Left = 825
- LinkTopic = "Form1"
- ScaleHeight = 3855
- ScaleWidth = 5580
- Top = 1110
- Width = 5700
- Begin PictureBox picIcon
- AutoSize = -1 'True
- BorderStyle = 0 'None
- Height = 480
- Index = 0
- Left = 1845
- Picture = CCOMBO.FRX:0000
- ScaleHeight = 480
- ScaleWidth = 480
- TabIndex = 11
- Top = 2490
- Visible = 0 'False
- Width = 480
- End
- Begin PictureBox picIcon
- AutoSize = -1 'True
- BorderStyle = 0 'None
- Height = 480
- Index = 1
- Left = 2340
- Picture = CCOMBO.FRX:027A
- ScaleHeight = 480
- ScaleWidth = 480
- TabIndex = 10
- Top = 2490
- Visible = 0 'False
- Width = 480
- End
- Begin PictureBox picIcon
- AutoSize = -1 'True
- BorderStyle = 0 'None
- Height = 480
- Index = 2
- Left = 2835
- Picture = CCOMBO.FRX:04F4
- ScaleHeight = 480
- ScaleWidth = 480
- TabIndex = 9
- Top = 2490
- Visible = 0 'False
- Width = 480
- End
- Begin CUACombo cbo1
- BorderStyle = 3 'Inset
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 300
- Left = 3450
- Style = 2 'Dropdown List
- TabIndex = 4
- Top = 765
- Width = 1845
- End
- Begin CUACommand cmdOK
- Cancel = -1 'True
- Caption = "OK"
- Default = -1 'True
- Height = 345
- Left = 4020
- StandardButton = 1 'OK
- TabIndex = 1
- Top = 105
- Width = 1260
- End
- Begin ComboBox Combo2
- Height = 300
- Index = 0
- Left = 180
- TabIndex = 2
- Top = 1110
- Width = 1500
- End
- Begin CUACombo Combo1
- BackColor = &H00FFFFFF&
- BorderStyle = 3 'Inset
- DataField = "TEXT"
- DataSource = "Data1"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00000000&
- Height = 300
- Index = 0
- Left = 1815
- TabIndex = 3
- Top = 1110
- Width = 1500
- End
- Begin ComboBox Combo2
- Height = 1890
- Index = 1
- Left = 180
- Style = 1 'Simple Combo
- TabIndex = 7
- Top = 1830
- Width = 1500
- End
- Begin ComboBox Combo2
- Height = 300
- Index = 2
- Left = 180
- Style = 2 'Dropdown List
- TabIndex = 5
- Top = 1470
- Width = 1500
- End
- Begin CUACombo Combo1
- BorderStyle = 3 'Inset
- DataField = "PM"
- DataSource = "Data1"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00000000&
- Height = 300
- Index = 1
- Left = 1815
- Style = 1 'Simple Combo
- TabIndex = 8
- Text = "Combo1"
- Top = 1830
- Width = 1500
- End
- Begin CUACombo Combo1
- BorderStyle = 3 'Inset
- DataField = "TAL"
- DataSource = "Data1"
- ForeColor = &H00000000&
- Height = 300
- Index = 2
- Left = 1815
- Style = 2 'Dropdown List
- TabIndex = 6
- Top = 1470
- Width = 1500
- End
- Begin Data Data1
- Caption = "CUACTLS.MDB"
- Connect = ""
- DatabaseName = "C:\BP\CUACTLS\CUACTLS.MDB"
- Exclusive = 0 'False
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 270
- Left = 180
- Options = 0
- ReadOnly = 0 'False
- RecordSource = "Test"
- Top = 765
- Width = 3135
- End
- Begin CUALabel lbl1
- Caption = "Visually more appealing."
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 195
- Index = 3
- Left = 3435
- TabIndex = 15
- Top = 3435
- Width = 1875
- End
- Begin CUALabel lbl1
- Caption = "Can show pictures, each row can have it's own."
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 435
- Index = 2
- Left = 3435
- TabIndex = 14
- Top = 2940
- Width = 2025
- End
- Begin CUALabel lbl1
- Caption = "Connects to databases, both the list and text field."
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 435
- Index = 1
- Left = 3435
- TabIndex = 13
- Top = 2460
- Width = 2025
- End
- Begin CUALabel lbl1
- Caption = "CUA/Controls ComboBox are compatible with VB:s, but has some additional advantages:"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 780
- Index = 0
- Left = 3435
- TabIndex = 12
- Top = 1605
- Width = 2025
- End
- Begin CUALabel lbl
- Caption = "To the left you see the standard component of VB, to the right are enhanced versions from CUA/Controls."
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00000080&
- Height = 435
- Index = 6
- Left = 180
- TabIndex = 0
- Top = 150
- Width = 3750
- End
- Begin Line Line1
- X1 = 1740
- X2 = 1740
- Y1 = 1095
- Y2 = 3690
- End
- Option Explicit
- Sub cmdOK_Click ()
- Unload Me
- End Sub
- Sub Form_Load ()
- Dim I%
- Data1.DatabaseName = DatabaseName
- ' Fill comboboxes with numbers from 1 to 10
- For I = 1 To 10
- Combo1(0).AddItem Format$(I)
- Combo1(1).AddItem Format$(I)
- Combo1(2).AddItem Format$(I)
- Combo2(0).AddItem Format$(I)
- Combo2(1).AddItem Format$(I)
- Combo2(2).AddItem Format$(I)
- Next
- ' Demonstrate combobox picture support
- cbo1.AddItem "Choose Font"
- cbo1.ListPicture(cbo1.NewIndex) = picIcon(0)
- cbo1.AddItem "Delete File"
- cbo1.ListPicture(cbo1.NewIndex) = picIcon(1)
- cbo1.AddItem "Copy Disk"
- cbo1.ListPicture(cbo1.NewIndex) = picIcon(2)
- cbo1.ListIndex = 0
- End Sub
-